package com.ricchieri.dao;

import java.util.List;

import org.hibernate.Criteria;

import com.ricchieri.dao.interf.IUserPhoneDao;
import com.ricchieri.filter.BasicFilter;
import com.ricchieri.model.UserPhone;

public class UserPhoneDao extends GenericDao implements IUserPhoneDao {

	private static final long serialVersionUID = -7962966654023971743L;

	@Override
	@SuppressWarnings("unchecked")
	public List<UserPhone> getAllUserPhone(BasicFilter filter) {
		Criteria criteria = criteriaAllUserPhone(filter);
		
		return criteria.list();
	}
	
	private Criteria criteriaAllUserPhone(BasicFilter filter) {
		return super.criteriaAllBasic(filter, UserPhone.class);
	}	

	@Override
	protected String getTableName() {
		return "userPhone";
	}
}
